package nowcoder;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import java.util.Scanner;

/**
 * @author： hmm
 * @date： 2020/7/17 9:57
 * @description： 24点
 * @modifiedBy：
 */
public class TwentyFour {
    public static void main(String[] args) throws ScriptException {
        Scanner scanner = new Scanner(System.in);
        String next = scanner.nextLine();

        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine js = manager.getEngineByName("js");

        char[] chars = next.toCharArray();//格式例如2 3 4 1 中间空格分隔
        char[] os = {'+', '-', '*', '%'};
        int count = 0;
        for (char c : os) {
            chars[1] = c;
            for (char c1 : os) {
                chars[3] = c1;
                for (char c2 : os) {
                    chars[5] = c2;
                    System.out.println(String.valueOf(chars));
                    int result = (int) js.eval(String.valueOf(chars));
                    if (result == 24) {
                        count ++;
                        System.out.println(String.valueOf(chars) + "== 24");
                    }
                }
            }
        }
        if (count == 0) {
            System.out.println("NONE");
        }
    }
}
